﻿// <copyright file="GlobalParameters.cs" company="Ecole Normale Supérieure">
// Released under GPLv2
// </copyright>
// <summary>Contains global parameters used by GameLogic.</summary>

namespace Sqwarea.GameLogic
{
    /// <summary>
    /// Contains global parameters used by GameLogic.
    /// </summary>
    public static class GlobalParameters
    {
        /// <summary>
        /// Number of troops produced by hour and by square.
        /// Notice that we take sqrt of the number of squares
        /// when the number of squares is >= TroopsNumberSqrtThreshold
        /// </summary>
        public const double HourlyTroopsProductionBySquare = 1.0;

        /// <summary>
        /// Number of troops produced per hour for the royal academy.
        /// </summary>
        public const double HourlyTroopProductionByAcademy = 6.0;

        /// <summary>
        /// Please see <see cref="HourlyTroopsProductionBySquare"/>
        /// </summary>
        public const int TroopsNumberSqrtThreshold = 50;

        /// <summary>
        /// Minimum number of hours between two king movements
        /// </summary>
        public const int MinimumHoursBetweenTwoKingMove = 12;

        /// <summary>
        /// Speed of soldiers : number of minutes for taking 1 square length forward.
        /// </summary>
        public const double SoldiersSpeed = 10.0;

        /// <summary>
        /// Initial number of troops in a square.
        /// </summary>
        public const int InitialSquareTroopsNumber  = 10;

        /// <summary>
        /// Initial number of troops in academy.
        /// </summary>
        public const int InitialAcademyTroopsNumber = 50;

        /// <summary>
        /// Minimum number of troops to get (or claim) a square.
        /// Used when an attacker has won a battle.
        /// </summary>
        public const int MinimumTroopsToClaimSquare = 1;

        /// <summary>
        /// Length of the list of best kings
        /// </summary>
        public const int TopListLength = 20;
        
        /// <summary>
        /// Initial count of squares. Equals 5 besause of the cross shape of the start.
        /// </summary>
        public const int InitialSquareCount = 5;

        /// <summary>
        /// Number of troops you win per square of defender when you kill the king of the defender
        /// <see cref="TroopsKillKing"/>
        /// </summary>
        public const int TroopsPerDefenderSquare = 5;

        /// <summary>
        /// Number of troops you win when you kill a king
        /// Total number of troops you win is : TroopsPerDefenderSquare * SquareOfDefender + TroopsPerKingDie
        /// </summary>
        public const int TroopsKillKing = 100;
    }
}
